package cn.lyjuan.dwz_manage.core.java.mapper;


import cn.lyjuan.dwz_manage.core.base.mapper.IManageMapper;
import cn.lyjuan.dwz_manage.core.base.pojo.ActionPojo;
import cn.lyjuan.dwz_manage.core.base.pojo.ManagePojo;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * Created by chad on 2016/8/23.
 */
public interface IMgManageMapper extends IManageMapper
{
    List<ActionPojo> selectPrivilegeByManageId(@Param("manageId") int manageId);

    /**
     * 根据账号查询管理员信息
     * @param name
     * @return
     */
    ManagePojo selectByName(@Param("name") String name);

    /**
     * 查询所有管理员
     * @param param
     * @param start
     * @param len
     * @return
     */
    List<ManagePojo> selectAllManages(@Param("param")Map<String, String> param, @Param("start")int start, @Param("len")int len);

    int selectAllManageCount(@Param("param")Map<String, String> param);

    /**
     * 查询管理员创建的管理员
     * @param createby	管理员编号
     * @return
     */
    List<ManagePojo> selectManagesForCreater(@Param("createby") String createby, @Param("param") Map<String, String> param, @Param("start") int start, @Param("len") int len);

    int selectManageCountForCreater(@Param("createby")String createby, @Param("param")Map<String, String> param);
}
